package com.czl.module_service.activity

import android.view.View
import android.widget.LinearLayout
import android.widget.Toast
import com.alibaba.android.arouter.facade.annotation.Route
import com.czl.base.base.BaseActivity
import com.czl.base.config.AppConstants
import com.czl.module_service.BR
import com.czl.module_service.R
import com.czl.module_service.databinding.ActivityOnlinePaymentBinding
import com.czl.module_service.viewmodel.OnlinePaymentViewModel

@Route(path = AppConstants.Router.Service.F_ONLINE_PAYMENT)
class OnlinePaymentActivity : BaseActivity<ActivityOnlinePaymentBinding, OnlinePaymentViewModel>() {

    fun click(v: View?) {
        when (v?.id) {
            R.id.ll_menu1 ->
                startContainerActivity(AppConstants.Router.Service.F_HOUSES_PAYMENT)
            R.id.ll_menu2 ->
                Toast.makeText(this, "点击了2", Toast.LENGTH_SHORT).show()
            R.id.ll_menu3 ->
                Toast.makeText(this, "点击了3", Toast.LENGTH_SHORT).show()
        }
    }
    override fun initData() {
        viewModel.tvTitle.set("在线缴费")
        /**
         * todo 判断用户类型，显示对应菜单
         */
        findViewById<LinearLayout>(R.id.ll_menu1).apply {
            visibility = View.VISIBLE
        }
    }
    override fun initContentView(): Int {
        return R.layout.activity_online_payment
    }

    override fun initVariableId(): Int {
        return BR.viewModel
    }


}